<?php


namespace app\miniProgram\controller;


use app\miniProgram\severs\Admin;
use think\facade\Db;

class Action extends Base
{
    /**
     * @autho:xiangzi
     * @auth:true
     * @Date:2024/8/5
     * 登录
     */
 public function login(){
     $validate=new \app\miniProgram\validate\Action();
     if (!$validate->scene('login')->check($this->param)){
         return $this->jump(0,$validate->getError());
     }
     return $this->jump(Admin::login($this->param));
 }
    public function getCompany()
    {
        $where[]=['status','=',1];
        $list=Db::name('company')->where($where)->field('id as value,name as label')->select();

        return $this->jump(1,'成功',$list);
    }

}